<template>
	<div>
		<MyKeepAlive>
			<Test1 v-if="val"></Test1>
			<Test2 v-else></Test2>
		</MyKeepAlive>
		<Checkbox v-model="val" style="margin:20px">切换</Checkbox>
	</div>
</template>

<script>
import Checkbox from '@/components/pc/checkbox';
import MyKeepAlive from '@/components/pc/my-keep-alive';
import Test1 from './Test1';
import Test2 from './Test2';
export default {
	name:'index',
	components:{
		MyKeepAlive,
		Checkbox,
		Test1,
		Test2,
	},
	data(){
		return {
			val:true,
		};
	},
	methods:{
	}
};
</script>

<style lang="scss">

</style>
